package io.read_file;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author haomin
 * @date 2022/05/09 19:33
 **/
public class ReadFile2 {
    public static void main(String[] args) throws IOException {
        try (InputStream is = new FileInputStream("D:\\电影\\文件操作\\bigFile.txt")){
            long start = System.currentTimeMillis();
            while (true){
                int b = is.read();
                if(b == -1){
                    break;
                }
                System.out.print(b);
            }
            System.out.println();
            long end = System.currentTimeMillis();
            System.out.println(end - start);
        }
    }
}